-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add cypress test to bulk select #1314
add cypress test to bulk select #1314
Conversation
|
||
// select a couple | ||
// but only ones that can be selected | ||
cy.get('.pf-v5-c-table__tbody').then(rows => {selectRandomEnabledRows({rows: rows, numberOfRowsToSelect: 3})}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cy.get('.pf-v5-c-table__tbody').then(rows => {selectRandomEnabledRows({rows: rows, numberOfRowsToSelect: 3})}); | |
cy.get(TABLE).then(rows => selectRandomEnabledRows({rows: rows, numberOfRowsToSelect: 3})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one doesn't work - the test gets stuck
cy.get(':nth-child(2) > .pf-v5-c-menu-toggle').should('have.text', '3 selected') | ||
|
||
// Select None | ||
cy.get(':nth-child(2) > .pf-v5-c-menu-toggle > .pf-v5-c-menu-toggle__controls').click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use PT_BULK_SELECT from FEC to select the bulk select toggle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PT_BULK_SELECT results in a flaky test. I think it's because it targets the pf-v5-c-menu-toggle
element, instead of the pf-v5-c-menu-toggle__controls
element. In some cases it then doesn't open the BS menu
Your errors are for linting. npm run lint should give you everything you need. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1314 +/- ##
=======================================
Coverage 22.22% 22.22%
=======================================
Files 96 96
Lines 2560 2560
Branches 811 811
=======================================
Hits 569 569
Misses 1991 1991 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebase to the base branch and you're good to go!
/retest |
574d02e
into
RedHatInsights:master
Description
Associated Jira ticket: RHINENG-14744
Add Cypress test to Bulk Selector
How to test the PR
run npm test:ct
Before the change
90 tests are run
After the change
At least 91 tests are run, including
The Bulk selector shows the correct number of systems selected.
Dependent work link
Checklist: